//
//  NSString+extend.m
//  Genpara
//
//  Created by AndyChang.zhang on 14-8-22.
//  Copyright (c) 2014年 zhangchh. All rights reserved.
//

#import "NSString+extend.h"

@implementation NSString(NSString_extend)

-(BOOL)isNullOrEmpty {
    
    if (self == nil || self.length == 0) {
        
        return YES;
    }
    return NO;
}

-(BOOL)isNotNullOrEmpty {
    
    return ![self isNullOrEmpty];
}

-(NSString *)toStr {
    
    if ([self isNullOrEmpty]) {
        
        return @"";
    }
    
    return self;
}

-(NSString *)toStr:(NSString *)defaultStr {
    
    if ([self isNullOrEmpty]) {
        
        return defaultStr;
    }
    
    return self;
}

-(BOOL)isNotNumbmic {
    
    return NO;
}

-(BOOL)isNumbmic {
    
    return NO;
}

@end
